package com.bilibili.bilibili.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2017/3/16.
 */

public class EveryoneSeekPagerAdapter extends FragmentStatePagerAdapter {
    private List<Fragment> mFragments;
    private final List<String> mStrings;

    public EveryoneSeekPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        mFragments = fragments;
        mStrings = new ArrayList<>();
        mStrings.add("番剧");
        mStrings.add("UP主");
        mStrings.add("影视");
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mStrings.get(position);
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }
}
